package com.cloud.message;

import com.cloud.common.bean.ResultInfo;
import com.cloud.common.sentinel.Sentinel;
import com.cloud.message.dto.MessageDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 消息服务提供者
 */
@Sentinel
@FeignClient(name = "cloud-message", contextId = "MessageProvider")
public interface MessageProvider {
    /**
     * 发送消息
     *
     * @param messageDTO
     * @return ResultInfo
     */
    @PostMapping("/message/send")
    ResultInfo<String> send(@RequestBody MessageDTO messageDTO);
}
